<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <link rel="stylesheet" href="/assets/lib/layui/css/layui.css" />
    <link rel="stylesheet" href="/assets/css/article/art_cate.css" />
  </head>
  <body>
    <!-- 卡片区域 -->
    <div class="layui-card">
      <div class="layui-card-header">
        <span>文章类别管理</span>
        <button type="button" class="layui-btn layui-btn-normal layui-btn-sm" id="btnAddCate">添加类别</button>
      </div>
      <div class="layui-card-body">
        <table class="layui-table">
          <colgroup>
            <col />
            <col />
            <col />
            <col width="150" />
          </colgroup>
          <thead>
            <tr>
              <th>序号</th>
              <th>分类名称</th>
              <th>分类别名</th>
              <th>操作</th>
            </tr>
          </thead>
          <tbody id="cateList"></tbody>
        </table>
      </div>
    </div>

    <!-- 导入 layui 的 js -->
    <script src="/assets/lib/layui/layui.all.js"></script>
    <!-- 导入 jquery -->
    <script src="/assets/lib/jquery.js"></script>
    <!-- 导入 baseAPI -->
    <script src="/assets/js/baseAPI.js"></script>
    <script src="/assets/lib/template-web.js"></script>
    <!-- 导入自己的 js -->
    <script src="/assets/js/user/art_cate.js"></script>

    <!-- 定义模板 -->
    <script type="text/html" id="tp1">
      {{each data}}
      <tr>
        <td>{{$value.Id}}</td>
        <td>{{$value.name}}</td>
        <td>{{$value.alias}}</td>
        <td data-id="{{$value.Id}}">
          <button type="button" class="layui-btn layui-btn-xs btn-edit">编辑</button>
          <button type="button" class="layui-btn layui-btn-danger layui-btn-xs btn-delete">删除</button>
        </td>
      </tr>
      {{/each}}
    </script>
  </body>
</html>
